將視窗置於幕前
window.focus 可將視窗置於幕前
程式碼如下:
<script>
function Event1(){
var w1 = window.open("http://www.google.com");
w1.focus();
}
</script>
<body onunload="Event1()">
<input type="button" value="Press to start" onclick="Event1()">